package com.example.perpetualcalendar.data;




import androidx.annotation.NonNull;

import com.example.perpetualcalendar.domain.entity.Almanac;
import com.example.perpetualcalendar.domain.entity.Calendar;
import com.example.perpetualcalendar.domain.entity.History;
import com.example.perpetualcalendar.domain.entity.Joke;
import com.example.perpetualcalendar.domain.entity.JokeRequest;

import java.util.HashMap;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * @author Api
 */
public interface Api {

    @NonNull
    @GET("/joke/content/list.php")
    Observable<Joke> getJoke(@QueryMap @NonNull HashMap<String, Object> hashMap);

    @NonNull
    @FormUrlEncoded
    @POST("/todayOnhistory/queryEvent.php")
    Observable<History> getHistory(@FieldMap @NonNull HashMap<String, Object>  hashMap);

    @NonNull
    @FormUrlEncoded
    @POST("/calendar/day")
    Observable<Calendar> getCalendar(@FieldMap @NonNull HashMap<String, Object>  hashMap);

    @NonNull
    @FormUrlEncoded
    @POST("/laohuangli/d")
    Observable<Almanac> getAlmanac(@FieldMap @NonNull HashMap<String, Object>  hashMap);
}
